import trees
import treePlotter as tp
import matplotlib.pyplot as plt

##########################################第二个隐形眼镜的例子##############################3
fr = open('lenses.txt')
lenses = [inst.strip().split('\t') for inst in fr.readlines()]
lensesLabels = ['age','prescript','astigmatic','tearRate']
lensesTree = trees.createTree(lenses,lensesLabels) 
print(lensesTree)
tp.createPlot(lensesTree)

